#include <sys/svcs.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <netinet/inet.h>
#include <netinet/in.h>
#include <iwconfig.h>
#include <raven.h>
#include "ieee802154.h"
#include "uart.h"

Defines | |
| #define | LEDMAX 20 |
| Maximum LED blink window, in units of 200ms epochs. | |
| #define | MAXIP 40 |
| maximum number of characters used to display IPv6 address | |
| #define | IPMSG "IPv6:" |
| default display string preceding IP addresses | |
| #define | IWMSG "LPAN-UP " |
| Completion notification of iwconfig UP. | |
| #define | HMSG "RockPing" |
| startup message displayed on the raven LCD | |
Functions | |
| void | __main (event_t event, void *cbargs, void *context) |
| this function is invoked after boot | |
| void | timer_handler (event_t event, void *cbaargs, void *context) |
| this function is invoked when the timer is fired | |
| void | iwconfig_handler (event_t event, void *cbargs, void *context) |
| this function is invoked when iwconfig() UP operation is complete | |
| void | route_notify_handler (event_t event, void *cbargs, void *context) |
| this function is invoked when svccntl() ROUTESVC_NOTIFY signal takes place | |
| void | iwstatus_handler (event_t event, void *cbargs, void *context) |
| this function is invoked when iwconfig() STATUS operation is complete | |
| void | setBlink (uint8_t count) |
| this function sets LED_cnt and LED_limit | |
| void | iwconfig_init (net_device_t net_device) |
Variables | |
| static int16_t | g_timerfd |
| timer descripter, used to hold the return value of timer() | |
| static uint8_t | LED_cnt = 0 |
| Current LED blink count, in units of 200ms epochs, initialized to 0. | |
| static uint8_t | LED_limit = 0 |
| Current LED blink limit, in units of 200ms epochs, initialized to 0. | |
| uint8_t | ieee154_channel = default_ieee154_channel |
| default 802.15.4 channel, defiend in ieee802154.h | |
| uint16_t | ieee154_panid = default_ieee154_panid |
| default 80215.4 PAN ID, defined in ieee802154.h | |
| static net_device_info_t | g_lpan0_info |
| Network interface information from iwconfig. | |
| #define HMSG "RockPing" |
startup message displayed on the raven LCD
| #define IPMSG "IPv6:" |
default display string preceding IP addresses
| #define IWMSG "LPAN-UP " |
Completion notification of iwconfig UP.
| #define LEDMAX 20 |
Maximum LED blink window, in units of 200ms epochs.
| #define MAXIP 40 |
maximum number of characters used to display IPv6 address
| void __main | ( | event_t | event, | |
| void * | cbargs, | |||
| void * | context | |||
| ) |
| void iwconfig_handler | ( | event_t | event, | |
| void * | cbargs, | |||
| void * | context | |||
| ) |
this function is invoked when iwconfig() UP operation is complete
iwconfig_handler
| event | equals to IWCONFIG as this is a iwconfig() UP callback | |
| cbargs | passes dev_info back from iwconfig() UP call | |
| context | passes context back from iwconfig() UP call |

| void iwconfig_init | ( | net_device_t | net_device | ) |
iwconfig_init
Initialize the wireless interface
| net_device | is the data structure used to hold the interface configuration data |

| void iwstatus_handler | ( | event_t | event, | |
| void * | cbargs, | |||
| void * | context | |||
| ) |
this function is invoked when iwconfig() STATUS operation is complete
iwstatus_handler
| event | equals to IWCONFIG as this is a iwconfig() STATUS callback | |
| cbargs | passes dev_info back from iwconfig() STATUS call | |
| context | passes context back from iwconfig() STATUS call |

| void route_notify_handler | ( | event_t | event, | |
| void * | cbargs, | |||
| void * | context | |||
| ) |
this function is invoked when svccntl() ROUTESVC_NOTIFY signal takes place
route_notify_handler
| event | equals to SVCCNTRL as this is a svccntrl() callback | |
| cbargs | passes resource back from svccntrl() call | |
| context | passes context back from svccntrl() call |

| void setBlink | ( | uint8_t | count | ) |
this function sets LED_cnt and LED_limit
setBlink
LED_cnt = count
LED_limit = LED_cnt * 2
| count | is the value of LED_cnt |
| void timer_handler | ( | event_t | event, | |
| void * | cbaargs, | |||
| void * | context | |||
| ) |
this function is invoked when the timer is fired
timer_handler
| event | equals to SETITIMER as this is a setitimer() callback | |
| cbargs | passes resource back from setitimer() call | |
| context | passes context back from setitimer() call |

net_device_info_t g_lpan0_info [static] |
Network interface information from iwconfig.
| uint8_t ieee154_channel = default_ieee154_channel |
default 802.15.4 channel, defiend in ieee802154.h
| uint16_t ieee154_panid = default_ieee154_panid |
default 80215.4 PAN ID, defined in ieee802154.h
uint8_t LED_cnt = 0 [static] |
Current LED blink count, in units of 200ms epochs, initialized to 0.
uint8_t LED_limit = 0 [static] |
Current LED blink limit, in units of 200ms epochs, initialized to 0.
1.5.5